#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	char ch;
	int ans = 0;
	while (cin >> ch) {
		if (ch != ' ' && ch != '\n')
			ans++;
	}
	cout << ans;
	return 0;
}
